<?php require_once 'init.php';
require_once 'ckLogin.php';
require_once 'dbClasses'.DIRECTORY_SEPARATOR.'config.php';
require_once 'dbClasses'.DIRECTORY_SEPARATOR.'dbConn.php';
$db = new dbConn();
//定义表名
define("TABLENAME","Pictures");
//工作完成情况
//$xingqi = date('w');
if(date('w') == 6){
	$db->sql="SELECT PublishDate,count(Identifier) count_id FROM ".TABLENAME." WHERE PublishDate = '".date("Y-m-d")."' OR PublishDate = '".date("Y-m-d",strtotime("+1 day"))."' OR PublishDate = '".date("Y-m-d",strtotime("+2 day"))."' GROUP BY PublishDate";
	$jobDo = $db->doResultList2();
	if(count($jobDo)>0){
		foreach ($jobDo as $item){
			if ($item['PublishDate'] == date("Y-m-d")){$t=1;}
			if ($item['PublishDate'] == date("Y-m-d",strtotime("+1 day") )){$y=1;}
			if ($item['PublishDate'] == date("Y-m-d",strtotime("+2 day") )){$h=1;}
		}
		if($t!=1 || $y!=1 || $h!=1){$tip="请更新<span style='color:red;font-size:14px;'>";if($t!=1) $tip.="今天";if($y!=1) $tip.="明天";if($h!=1) $tip.="后天";$tip.="</span>的内容";}
	}else{
		$tip = "请更新<span style='color:red;font-size:14px;'>今天明天后天</span>的内容";
	}
}elseif ( in_array(date('w'),array(1,2,3,4,5)) ){
	$db->sql="SELECT PublishDate,count(Identifier) count_id FROM ".TABLENAME." WHERE PublishDate = '".date("Y-m-d")."' OR PublishDate = '".date("Y-m-d",strtotime("+1 day"))."' GROUP BY PublishDate";
	$jobDo = $db->doResultList2();
	if(count($jobDo)>0){
		$tip="请更新<span style='color:red;font-size:14px;'>";
		foreach ($jobDo as $item){
			if ($item['PublishDate'] == date("Y-m-d")){$t=1;}
			if ($item['PublishDate'] == date("Y-m-d",strtotime("+1 day") )){$y=1;}
		}
		if ($t!=1){$tip.="今天";}if ($y!=1){$tip.="明天";}
		$tip .= '</span>的内容';
	}else{
		$tip = "请更新<span style='color:red;font-size:14px;'>今天明天</span>的内容";
	}
}else{
	$tip = '';
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
		
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		
		<title><?php echo APP;?></title>
		
		<!--                       CSS                       -->
	  
		<!-- Reset Stylesheet -->
		<link rel="stylesheet" href="resources/css/reset.css" type="text/css" media="screen" />
	  
		<!-- Main Stylesheet -->
		<link rel="stylesheet" href="resources/css/style.css" type="text/css" media="screen" />
		
		<!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid -->
		<link rel="stylesheet" href="resources/css/invalid.css" type="text/css" media="screen" />	
		
		<!-- jQuery -->
		<script type="text/javascript" src="resources/scripts/jquery-1.7.2.min.js"></script>
		<script type="text/javascript">
		$(function($){
			$("#downloadYesterday").click(function(){
				if(confirm("确定要下载<?php echo APP;?>昨日信息吗？")){
					window.open("downloadExcel2.php?startTime=<?php echo date("Ymd",strtotime("-1 day"));?>&endTime=<?php echo date("Ymd",strtotime("-1 day"));?>");
				}else{
					return false;
				}
				
			});
			$("a").click(function(){
				$("a").removeClass("current");
				$(this).addClass("current");
			});
		});
		</script>
		<!-- jQuery Configuration -->
		<script type="text/javascript" src="resources/scripts/simpla.jquery.configuration.js?v=20140228"></script>
		
		<!-- Facebox jQuery Plugin -->
		<script type="text/javascript" src="resources/scripts/facebox.js"></script>
		
		<!-- jQuery WYSIWYG Plugin -->
		<script type="text/javascript" src="resources/scripts/jquery.wysiwyg.js"></script>
		
		<!-- jQuery Datepicker Plugin -->
		<script type="text/javascript" src="resources/scripts/jquery.datePicker.js"></script>
		<script type="text/javascript" src="resources/scripts/jquery.date.js"></script>
		<!--[if IE]><script type="text/javascript" src="resources/scripts/jquery.bgiframe.js"></script><![endif]-->

		
		<!-- Internet Explorer .png-fix -->
		
		<!--[if IE 6]>
			<script type="text/javascript" src="resources/scripts/DD_belatedPNG_0.0.7a.js"></script>
			<script type="text/javascript">
				DD_belatedPNG.fix('.png_bg, img, li');
			</script>
		<![endif]-->

	</head>
  
	<body><div id="body-wrapper"> <!-- Wrapper for the radial gradient background -->
		
		<div id="sidebar"><div id="sidebar-wrapper"> <!-- Sidebar with logo and menu -->
			
			<h1 id="sidebar-title"><a href="index.html">管理后台</a></h1>
		  
			<!-- Logo (221px wide) -->
			<!-- <a href="#"><img id="logo" src="resources/images/logo.png" alt="Simpla Admin logo" /></a> -->
		    <p style="height: 30px;"></p>
			<!-- Sidebar Profile links -->
			<div id="profile-links">
			<?php echo $tip;?><br />
				你好, <a href="#" title="Edit your profile"><?php echo $_SESSION['nickName'];?></a>
				<!-- , you have <a href="#messages" rel="modal" title="3 Messages">3 Messages</a><br /> -->
				<br />
				<a href="changePwd.php" title="change password" target="to_main">修改帐号</a> | <a href="loginOut.php" title="Sign Out">退出</a>
			</div>        
			<ul id="main-nav">  <!-- Accordion Menu -->
				<!-- <li>
					<a href="http://www.google.com/" class="nav-top-item no-submenu"> Add the class "no-submenu" to menu items with no sub menu
						图片
					</a>
				</li>
				-->
				<li> 
					<a href="#" class="nav-top-item current"> <!-- Add the class "current" to current menu item -->
					优品购物商品
					</a>
					<ul>
						<!----><li><a <?php echo $_GET['linkpage']=='picList.php'?'class="current"':'';?> href="picList.php"  target="to_main"><?php echo WHAT;?>列表</a></li>
						<li><a <?php echo $_GET['linkpage']=='picListV2.php'?'class="current"':'';?> href="picListV2.php"  target="to_main"><?php //echo WHAT;?>列表Beta1</a></li>
						<li><a <?php echo $_GET['linkpage']=='insertNew.php'?'class="current"':'';?> href="insertNew.php" target="to_main"><?php echo WHAT;?>审核</a></li>
						<li><a class="" href="http://qzone.upin.com/taobaoItemInfo-v2.0/" target="to_main">商品录入</a></li>
						<!-- <li><a class="" href="usertuijian.php" target="to_main">用户推荐</a></li>
						<li><a class="" href="cuXiaoInsert.php" target="to_main">促销商品添加</a></li>
						<li><a class="" href="cuXiaoList.php"  target="to_main">促销商品列表</a></li> -->
						
						<!-- <li><a class="" href="insert9point9.php" target="to_main">￥9.9元商品添加</a></li>
						<li><a class="" href="list9point9.php"  target="to_main">￥9.9元商品列表</a></li>
						<li><a class="" href="category.php" target="to_main"><?php echo WHAT;?>分类</a></li> -->
					</ul>
				</li>
				<li> 
					<a href="#" class="nav-top-item"> <!-- Add the class "current" to current menu item -->
					内涵图推广
					</a>
					<ul>
						<li><a class="current " href="zz_extent_neihantuTG_picList.php"  target="to_main"><?php echo WHAT;?>列表</a></li>
						<li><a class="" href="zz_extent_neihantuTG_insertNew.php" target="to_main"><?php echo WHAT;?>审核</a></li>
						<li><a class="" href="http://qzone.upin.com/taobaoItemInfo-v2.0-neihantuTG/" target="to_main">商品录入</a></li>
						
					</ul>
				</li>
				<!-- <li> 
					<a href="#" class="nav-top-item"> 
					返还网商品
					</a>
					<ul>
						<li><a class="current " href="fanhuan_picList.php"  target="to_main"><?php echo WHAT;?>列表</a></li>
						<li><a class="" href="fanhuan_insertNew.php" target="to_main"><?php echo WHAT;?>审核</a></li>
						<li><a class="" href="http://qzone.upin.com/taobaoItemInfo-v2.0-fanhuan/" target="to_main">商品录入</a></li>
						<li><a class="" href="fanhuan_category.php" target="to_main"><?php echo WHAT;?>分类</a></li>
						
					</ul>
				</li> -->
				<li> 
					<a href="#" class="nav-top-item"> 
					节日专题商品
					</a>
					<ul>
						<li><a class="current " href="zz_extend_zhuanti_picList.php"  target="to_main"><?php echo WHAT;?>列表</a></li>
						<li><a class="" href="zz_extend_zhuanti_insertNew.php" target="to_main"><?php echo WHAT;?>审核</a></li>
						<li><a class="" href="http://qzone.upin.com/taobaoItemInfo-v2.0-zhuanti/" target="to_main">商品录入</a></li>
					</ul>
				</li>
				<li> 
					<a href="#" class="nav-top-item"> <!-- Add the class "current" to current menu item -->
					去淘宝商品
					</a>
					<ul>
						<li><a class="current " href="qutaobao_picList.php"  target="to_main"><?php echo WHAT;?>列表</a></li>
						<li><a class="" href="qutaobao_insertNew.php" target="to_main"><?php echo WHAT;?>审核</a></li>
						<li><a class="" href="http://qzone.upin.com/taobaoItemInfo-v2.0-qutaobao/" target="to_main">商品录入</a></li>
						
					</ul>
				</li>
				<li>
					<a href="#" class="nav-top-item">
						绩效情况
					</a>
					<ul>					
						<li><a class="" href="UserPerform.php" target="to_main">用户绩效</a></li>
						<li><a class="" href="PerformList.php" target="to_main">绩效列表</a></li>
						<li><a class="" href="OrderData.php" target="to_main">订单列表</a></li>
						<li><a class="" href="PerformList2.php" target="to_main">绩效列表2</a></li>
					</ul>
				</li>
				<li>
					<a href="#" class="nav-top-item">
						评论、头像
					</a>
					<ul>
						<li><a href="virtualuserAdd.php" target="to_main">头像添加</a></li>
						<li><a href="virtualuserList.php" target="to_main">头像列表</a></li>
						<li><a href="commentAdd.php" target="to_main">虚拟评论添加</a></li>
						<li><a href="commentList.php" target="to_main">虚拟评论列表</a></li>
						<li><a href="commentList2.php" target="to_main">评论列表</a></li>
					</ul>
				</li>
				<li>
					<a href="#" class="nav-top-item">
						竞拍、兑换
					</a>
					<ul>
						<li><a href="auctiongoodsList.php" target="to_main">竞拍商品列表</a></li>
						<li><a href="auctiongoodsAdd.php" target="to_main">竞拍商品添加</a></li>
						<li><a href="auctionList.php" target="to_main">竞拍管理</a></li>	
						<li><a href="zz_exchangeList.php" target="to_main">兑换商品列表</a></li>
						<li><a href="zz_exchangeAdd.php" target="to_main">兑换商品添加</a></li>
						<li><a href="zz_exchange.php" target="to_main">兑换管理</a></li>
						<li><a href="zz_exchangeQuestion.php" target="to_main">兑换问题</a></li>						
					</ul>
				</li>
				
				<!-- <li>
					<a href="#" class="nav-top-item">
						优惠券
					</a>
					<ul>
						<li><a href="couponList.php" target="to_main">优惠券列表</a></li>
						<li><a href="couponAdd.php" target="to_main">优惠券添加</a></li>					
					</ul>
				</li> -->
				<!-- <li>
					<a href="#" class="nav-top-item">
						趣味问答
					</a>
					<ul>
						<li><a class="" href="funQuiz.php" target="to_main">趣味问答</a></li>
						<li><a class="" href="funQuizAdd.php" target="to_main">添加问题</a></li>
					</ul>
				</li> -->
				
				<?php if($_SESSION['userName']=='admin'):?>
				<li>
					<a href="#" class="nav-top-item">
						用户管理
					</a>
					<ul>
						<li><a class="" href="userManage.php" target="to_main">用户管理</a></li>
						<li><a class="" href="userAdd.php" target="to_main">用户添加</a></li>						
						<!--
						<li><a class="" href="UserPerform.php" target="to_main">用户绩效</a></li>
						<li><a class="" href="PerformList.php" target="to_main">绩效列表</a></li>
						 -->
						<li><a class="" href="ParamSet.php" target="to_main">绩效参数设置</a></li>
					</ul>
				</li>
				<?php endif;?>
				<li>
					<a href="#" class="nav-top-item">
						其他
					</a>
					<ul>
						<!-- <li><a class="" href="" id="downloadYesterday">昨日导出</a></li> -->
						<!-- <li><a class="" href="downloadExcel.php" target="to_main">更多导出</a></li> -->
						<!-- <li><a class="" href="click.php" target="to_main">点击</a></li> -->
						<li><a class="" href="bottomWords.php" target="to_main">底部导言</a></li>
						<li><a class="" href="bottomLinks.php" target="to_main">底部链接</a></li>
						<li><a class="" href="message.php" target="to_main">留言</a></li>
						<li><a class="" href="leavelmessage.php" target="to_main">留言（新）</a></li>
						<li><a class="" href="couponList.php" target="to_main">优惠券</a></li>
						<li><a class="" href="statistic.php" target="to_main">统计</a></li>
						<li><a class="" href="goldrank.php" target="to_main">金币排行</a></li>
					</ul>
				</li>
				
			</ul> <!-- End #main-nav -->
			
		</div></div> <!-- End #sidebar -->
		
	</div></body>
  

<!-- Download From www.exet.tk-->
</html>
